{{template "../public/page_header.html" .}}

<div class="container-fluid">
    <div class="row">
        <div class="panel panel-default">
            <div class="panel-heading">
                编辑权限
            </div>
            <div class="panel-body">
                <div class="table-responsive input-form">
                    <form action="/{{config "String" "adminPath" ""}}/auth/goedit" method="post">
                        <ul>
                            <input type="hidden" name="id" value="{{.auth.Id}}">
                            <li> 模块名称: <input type="text" name="module_name" value="{{.auth.ModuleName}}"/></li>
                            <li>
                                节点类型:
                                <!-- 1、表示模块   2、表示菜单     3、操作 -->
                            {{$type := .auth.Type}}
                                <select name="type" id="type">
                                    <option value="1" {{if eq $type 1}} selected {{end}}>模块</option>
                                    <option value="2" {{if eq $type 2}} selected {{end}}>菜单</option>
                                    <option value="3" {{if eq $type 3}} selected {{end}}>操作</option>
                                </select>
                            </li>
                            <li> 操作名称: <input type="text" name="action_name" value="{{.auth.ActionName}}"/></li>
                            <li> 操作地址: <input type="text" name="url" value="{{.auth.Url}}"/></li>
                            <li> 所属模块:
                            {{$moduleId := .auth.ModuleId}}
                                <select name="module_id" id="module_id">
                                    <option value="0">---顶级模块--</option>
                                {{range $key,$value := .authList}}
                                {{if eq $moduleId $value.Id}}
                                    <option selected value="{{$value.Id}}">{{$value.ModuleName}}</option>
                                {{else}}
                                    <option value="{{$value.Id}}">{{$value.ModuleName}}</option>
                                {{end}}
                                {{end}}
                                </select>
                            </li>
                            <li> 排　　序: <input type="text" name="sort" value="{{.auth.Sort}}"/></li>
                            <li> 描　　述 :
                                <textarea name="description" id="description" cols="60"
                                          rows="5">{{.auth.Description}}</textarea>
                            </li>
                            <li> 状　　态:
                            {{$status := .auth.Status}}
                                <input type="radio" name="status" {{if eq $status 1}}
                                       checked {{end}}  value="1" id="a"/> <label for="a">显示</label>
                                <input type="radio" name="status" {{if eq $status 0}} checked {{end}} value="0" id="b"/><label
                                        for="b">隐藏</label> 　
                            </li>
                            <li>
                                <br/>
                                <button type="submit" class="btn btn-default">提交</button>
                            </li>
                        </ul>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

</body>
</html>